<div class="" ng-controller="ChannelIdentityController">
    <div class="mt20 clearfix">
        <div class="fr btn-group">
            <a href="javascript:;" class="btn btn-yellow permission p-500302-01-inline-block"
               ui-dialog="新增选项"
               ui-dialog-ok="add($data,'Identification',$dialog,$dialogScope)"
               ui-dialog-cache="false"
               ui-dialog-url="inc/dialog/param_list_edit.html"><i class="btn-icon-add"></i>新增选项</a>
            <a href="javascript:;" class="btn permission p-500302-04-inline-block" ng-click="reset('Identification')">还原备选项</a>
        </div>
    </div>
    <div class="sheet">
        <table width="100%" class="mt5">
            <thead>
            <tr>
                <th height="34" style="width:60px">序号</th>
                <th>选项名称</th>
                <th style="width:120px">状态 </th>
                <th style="width:120px">是否默认</th>
                <th style="width:300px">操作</th>
            </tr>
            </thead>
            <tbody ng-if="loading">
            <tr height="60">
                <td colspan="5">加载中...</td>
            </tr>
            </tbody>

            <tbody ng-if="!loading && (!list || list.length==0)">
            <tr height="60">
                <td colspan="5">查询条件无数据</td>
            </tr>
            </tbody>
            <tbody ng-if="!loading && list && list.length>0">
            <tr ng-repeat="item in list | orderBy : 'Order'">
                <td width="60" height="34">{{$index+1}}</td>
                <td>{{item.Text}}</td>
                <td><i ng-if="item.Disabled != '0'" href="javascript:;"
                       class="c-blue"
                      >已禁用</i>
                    <i ng-if="item.Disabled == '0'" class="c-blue">已启用</i></td>
                <td>
                    <a ng-if="item.IsDefault != '1'" href="javascript:;"
                       class="c-blue permission p-500302-02-inline-block"
                       ng-click="setDefault(item,'Identification')">设为默认</a>
                    <i ng-if="item.IsDefault == '1'" class="icon-op icon-op-check">&nbsp;</i>
                </td>
                <td style="text-align: left;">
                    <a href="javascript:void(0)" title="编辑" style="margin-left: 40px;"
                       class="mr15 permission p-500302-02-inline-block"
                       ui-dialog="编辑选项"
                       ui-dialog-show="showEditPop($data,$dialog,$dialogScope)"
                       ui-dialog-data="item"
                       ui-dialog-cache="false"
                       ui-dialog-ok="edit($data,$dialog,$dialogScope)"
                       ui-dialog-url="inc/dialog/param_list_edit.html">
                        <i class="icon-op icon-op-edit">&nbsp;</i>
                    </a>
                    <a href="javascript:void(0)" title="禁用" class="mr15 permission p-500302-02-inline-block"
                       ng-click="setDisable(item)"
                       ng-if="item.Disabled != '1'">
                        <i class="icon-op icon-op-stop">&nbsp;</i>
                    </a>
                    <a href="javascript:void(0)" title="启用" class="mr15 permission p-500302-02-inline-block"
                       ng-click="setEnable(item,'Identification')"
                       ng-if="item.Disabled == '1'">
                        <i class="icon-op icon-op-star">&nbsp;</i>
                    </a>
                    <a href="javascript:void(0)" title="删除"
                       ng-click="delete(item)" class="mr15 permission p-500302-03-inline-block">
                        <i class="icon-op icon-op-del">&nbsp;</i>
                    </a>
                    <a href="javascript:void(0)" title="下移" ng-show="!$last"
                       ng-click="moveDown(item,'Identification')" class="mr15 permission p-500302-02-inline-block">
                        <i class="icon-op icon-op-down">&nbsp;</i>
                    </a>
                    <a href="javascript:void(0)" title="上移" ng-show="!$first"
                       class="permission p-500302-02-inline-block"
                       ng-click="moveUp(item,'Identification')"><i class="icon-op icon-op-up">
                        &nbsp;</i></a>
                </td>
            </tr>
            </tbody>
        </table>
    </div>
    <div class="tab f14 mt20 clearfix">
        <ul>
            <li ng-class="{'tab-on':tab.value==tabSelectedValue}" ng-repeat="tab in tabs"
                ng-click="setTabSelected(tab)">
                <a href="javascript:;">{{tab.name}}</a>
            </li>
        </ul>
        <div class="tab-bottom-line"></div>
    </div>
    <div class="mt5 clearfix">
        <div class="fr btn-group">
            <a href="javascript:;" class="btn btn-yellow permission p-500302-01-inline-block"
               ui-dialog="新增选项"
               ui-dialog-ok="add($data,null,$dialog,$dialogScope)"
               ui-dialog-cache="false"
               ui-dialog-url="inc/dialog/param_list_edit.html">
                <i class="btn-icon-add"></i>新增选项</a>
            <a href="javascript:;" class="btn permission p-500302-04-inline-block" ng-click="reset()">还原备选项</a>
        </div>
    </div>
    <div class="sheet">
        <table width="100%" class="mt5">
            <thead>
            <tr>
                <th height="34" style="width:60px">序号</th>
                <th>选项名称</th>
                <th style="width:120px">状态</th>
                <th style="width:120px">是否默认</th>
                <th style="width:300px">操作</th>
            </tr>
            </thead>
            <tbody ng-if="loading">
            <tr height="60">
                <td colspan="5">加载中...</td>
            </tr>
            </tbody>

            <tbody ng-if="!loading && (!tabList || tabList.length==0)">
            <tr height="60">
                <td colspan="5">查询条件无数据</td>
            </tr>
            </tbody>
            <tbody ng-if="!loading && tabList && tabList.length>0">
            <tr ng-repeat="item in tabList | orderBy : 'Order'">
                <td width="60" height="34">{{$index+1}}</td>
                <td>{{item.Text}}</td>
                <td><i ng-if="item.Disabled != '0'" href="javascript:;"
                       class="c-blue"
                        >已禁用</i>
                    <i ng-if="item.Disabled == '0'" class="c-blue">已启用</i></td>
                <td>
                    <a ng-if="item.IsDefault != '1'" href="javascript:;"
                       class="c-blue permission p-500302-02-inline-block"
                       ng-click="setDefault(item)">设为默认</a>
                    <i ng-if="item.IsDefault == '1'" class="icon-op icon-op-check">&nbsp;</i>
                </td>
                <td style="text-align: left;">
                    <a href="javascript:void(0)" title="编辑" style="margin-left: 40px;"
                       class="mr15 permission p-500302-02-inline-block"
                       ui-dialog="编辑选项"
                       ui-dialog-show="showEditPop($data,$dialog,$dialogScope)"
                       ui-dialog-data="item"
                       ui-dialog-ok="edit($data,$dialog,$dialogScope)"
                       ui-dialog-cache="false"
                       ui-dialog-url="inc/dialog/param_list_edit.html"><!--TODO-->
                        <i class="icon-op icon-op-edit">&nbsp;</i>
                    </a>
                    <a href="javascript:void(0)" title="禁用" class="mr15 permission p-500302-02-inline-block"
                       ng-click="setDisable(item)"
                       ng-if="item.Disabled != '1'">
                        <i class="icon-op icon-op-stop">&nbsp;</i>
                    </a>
                    <a href="javascript:void(0)" title="启用" class="mr15 permission p-500302-02-inline-block"
                       ng-click="setEnable(item,'Identification')"
                       ng-if="item.Disabled == '1'">
                        <i class="icon-op icon-op-star">&nbsp;</i>
                    </a>
                    <a href="javascript:void(0)" title="删除"
                       class="mr15 permission p-500302-03-inline-block" ng-click="delete(item)">
                        <i class="icon-op icon-op-del">&nbsp;</i>
                    </a>
                    <a href="javascript:void(0)" title="下移" ng-show="!$last"
                       class="mr15 permission p-500302-02-inline-block" ng-click="moveDown(item)">
                        <i class="icon-op icon-op-down">&nbsp;</i>
                    </a>
                    <a href="javascript:void(0)" title="上移" ng-show="!$first"
                       class="permission p-500302-02-inline-block" ng-click="moveUp(item)"><i
                            class="icon-op icon-op-up">
                        &nbsp;</i></a>
                </td>
            </tr>
            </tbody>
        </table>
    </div>
</div>
